<?php $this->placeholder('display-commercial1')->set(1)?>
<?php $this->placeholder('container-class')->set('index') ?>
<?php $this->jQuery()->enable() ?>
<?php $this->JQuery()->addJavascriptFile(Ac_Util::getImageBaseUrl('/js/custom_index.v-'.AC_VERSION.'.js'))?>
<?php $this->headLink()->appendStylesheet(Ac_Util::getImageBaseUrl('/css/custom_index.css'))?>
<?php $this->JQuery()->javascriptCaptureStart()?>
var list_pick; 
var id_pick;
$j(window).load(function() {
    list_pick = $j('.pick-rotate');
    id_pick = 0;
    setTimeout('displayPick()', 5000);
});

function displayPick() {
    $j('#pick-rotate-' + id_pick)
        .fadeOut(1000, function() {
            id_pick = (id_pick+1) % list_pick.length;
            $j('#pick-rotate-' + id_pick).fadeIn(1000);
            setTimeout('displayPick()', 5000);
        });
}
<?php $this->JQuery()->javascriptCaptureEnd()?>
<article class="article"> 
	<section class="main_section">
        <?php $key = $this->key_homepage_intro_user; //'homepage_intro_user'?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <section class="intro usersThumb">
                <h3><em><?php echo $this->tot_user?></em>个用户已经分享了<em><?php echo $this->tot_listing?></em>件宝贝</h3>
                <p>
                <?php foreach($this->intro_users as $intro):?>
                    <?php if (empty($nitro)) { continue;}?>
                    <a href="<?php echo $intro->url()?>"><img src="<?php echo $this->thumbnail()->resizeAndCrop(!empty($intro->cid) ? $intro->company->image : $intro->pp, 28, 28, true)?>" alt="<?php echo $intro->name?>"></a>

                <?php endforeach;?>
                </p>
            </section>      
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>

	
        <?php echo $this->partial('index/commercial-zone1.phtml', 'default');?>
	    <section class="pick box">
	    	<?php if(!empty($this->todayspick)):?>
			<section class="highlight">
                <?php foreach($this->todayspick as $k => $item):?>
                    <div <?php echo $k > 0 ? 'style="display:none"' : '' ?> class="pick-rotate" id="pick-rotate-<?php echo $k?>">
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 488,
                                'photo_height'          => 353,
                                'photo_params'          => array(),
                                'display_photo_if_not_exists' => true,
                                'display_category'      => false,
                                'lazy_loading'          => false,
                        ));
                    ?>
                    </div>
                <?php endforeach;?>
	        </section>
	        <?php endif;?>
	        <section class="login">
	          	<h4>想找什么，就找到什么！</h4>
	          	<p>一切衣食住行，猫找都可以为你效劳！</p>
	          	<p class="button"><a href="/user/login">登录</a></p>
	          	<p class="button em"><a href="/user/register">注册</a></p>
        	</section>
            <?php $key = 'homepage_category'?>
            <?php if (!$output = $this->cacheOutput()->start($key)):?>
                <section class="category">
                    <h4>我们的分类</h4>
                    <ul>
                    <?php $flag = $i = $name = $count_unit = 0;?>
                    <?php $list = Model_Category::all(array('sa'=>1, 'path' => array('$size' => 1)))->sort(array('pos' => 1));?>
                    <?php foreach($list as $cat):?>
                        <?php 
                        switch($i){
                            case 0:		$flag = "property";
                                        $name = "房地产";
                                        $count_unit = "物业";
                                        break;
                            case 1:		$flag = "car";
                                        $name = "车辆";
                                        $count_unit = "宝贝";
                                        break;
                            case 2:		$flag = "pet";
                                        $name = "宠物";
                                        $count_unit = "宝贝";
                                        break;
                            case 3:		$flag = "fashion"; 
                                        $name = "服装/箱包";
                                        $count_unit = "宝贝";
                                        break;
                            case 4:		$flag = "beauty"; 
                                        $name = "美容/健康";
                                        $count_unit = "宝贝";
                                        break;
                            case 5:		$flag = "digital"; 
                                        $name = "数码家电";
                                        $count_unit = "宝贝";
                                        break;
                            case 6:		$flag = "home"; 
                                        $name = "家居生活";
                                        $count_unit = "宝贝";
                                        break;
                            case 7:		$flag = "leisure";
                                        $name = "休闲娱乐";
                                        $count_unit = "宝贝";
                                        break;
                            case 8:		$flag = "baby"; 
                                        $name = "母婴/幼儿";
                                        $count_unit = "宝贝";
                                        break;
                            case 9:		$flag = "job";
                                        $name = "求职招聘";
                                        $count_unit = "工作";
                                        break;
                            case 10:	$flag = "edu";
                                        $name = "教育培训";
                                        $count_unit = "宝贝";
                                        break;
                            case 11:	$flag = "food"; 
                                        $name = "餐饮";
                                        $count_unit = "宝贝";
                                        break;
                            case 12:	$flag = "adult"; 
                                        $name = "成人用品";
                                        $count_unit = "宝贝";
                                        break;
                            case 13:	$flag = "business"; 
                                        $name = "商业目录";
                                        $count_unit = "宝贝";
                                        break;
                        }
                        $i++;?>
                        <li class="<?php echo $flag;?>"><a href="<?php echo $cat->url()?>"><h1><?php echo $name?></h1><span><?php echo $cat->listing_count.$count_unit;?></span></a></li>
                    <?php endforeach;?>
                    <?php //endfor;?>
                    <?php //}?>
                    </ul>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>
		
		<section class="mkt box">
			<ul>
				<li class="post_ad">
					<dl>
						<dt>
							<h3><a href="/listing/post-an-ad">免費发布信息</a></h3>
						</dt>
						<dd>只需不到一分钟时间，即可在14个热门分类中发布信息、出售宝贝，吸引千万用户浏览。<a href="/listing/post-an-ad">发新信息</a></dd>
					</dl>
				</li>
				<li class="newsletter">
					<dl>
						<dt>
							<h3><a href="/default/index/newsletter">免费与猫找网互动</a></h3>
						</dt>
						<dd>订阅业务简报，紧贴猫找网最新宝贝信息、推广优惠及最新动态。<a href="/default/index/newsletter">立即订阅</a></dd>
					</dl>
				</li>
				<li class="bulk">	
					<dl>
						<dt>
							<h3><a href="/default/index/bulk-listing">免费商家营销服务 </a></h3>
						</dt>
						<dd>不需逐一发布宝贝，开通猫找网免费“商家营销服务”，即可批量发布你图文并茂的宝贝。<a href="/default/index/bulk-listing">在线申请</a></dd>
					</dl>
				</li>
				<li class="business_acc">	
					<dl>
						<dt><h3><a href="/user/register-business">免费注册商家帐户 </a></h3></dt>
						<dd>注册商家账户，你的公司即可纳入猫找网行业目录，并免费开通“商家营销服务”。<a href="/user/register-business">立即注冊</a></dd>
					</dl>
				</li>
			</ul>
		</section>

        <section class="new gallery hor box">
            <h3>最新宝贝</h3>
            <?php $key = $this->key_homepage_new_listing; //'homepage_new_listing'?>
            <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <?php
                if ($this->new_listing instanceof Shanty_Mongo_Iterator_Cursor)  {
                    $list = $this->new_listing;
                } else {
                    $list = array();
                }
                ?>
                <ul>
                <?php foreach($list as $item):?>
                    <li>
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 190,
                                'photo_height'          => 190,
                                'photo_params'          => array(),
                                'display_photo_if_not_exists' => true,
                                'display_date'                => false,
                                'display_category'            => false,
                                'display_customization'       => false,                            
                        ));
                    ?>                
                    </li>
                <?php endforeach;?>
                </ul>
                <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
                <!-- not cached: <?php echo $key?> -->
            <?php else :?>
                <?php echo $output?>
                <!-- cached: <?php echo $key?> -->
            <?php endif;?>

            <?php $key = $this->key_homepage_new_user1;?>
            <?php if (!$output = $this->cacheOutput()->start($key)):?>
                <section class="usersThumb">
                    <h4>他们也在不停追加新产品</h4>
                    <p>
                    <?php $count = 0;?>
                    <?php foreach($this->new_users as $user_l):?>
                        <?php
                        if(!empty($user_l->cid)){
                            //if(empty($user_l->company->image) || empty($user_l->company->username)) {
                            //    continue;
                            //}
                            $url   = $user_l->company->url();
                            $photo = $user_l->company->image;
                            $name  = $user_l->company->company_name;
                        } else {
                            //if(empty($user_l->pp)){
                            //    continue;
                           //}
                            $url   = $user_l->url();
                            $photo = $user_l->pp;
                            $name  = $user_l->name;
                        }
                        ?>
                            <a href="<?php echo $url?>"><img src="<?php echo $this->thumbnail()->scale($photo, 24, 24, true, true)?>" alt="<?php echo $name?>"></a>
                        <?php 
                        $count++;
                        if($count == 12){
                            break;
                        }
                        ?>
                    <?php endforeach;?>
                    </p>
                </section>
                <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
                <!-- not cached: <?php echo $key?> -->
            <?php else :?>
                <?php echo $output?>
                <!-- cached: <?php echo $key?> -->
            <?php endif;?>

        </section>
   

        <?php $key = $this->key_homepage_popular_listings; //'homepage_popular_listing'?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?> 
            <section class="popular gallery hor box">
                <h3>热门宝贝</h3>
                <ul>
                    <?php foreach($this->pop_listing as $item):?>
                        <li>
                            <?php
                                $this->partial()->setObjectKey('model');
                                echo $this->partial(
                                    'index/listing-element.phtml',
                                    'search',
                                    array(
                                        'item'                  => $item,
                                        'photo_width'           => 190,
                                        'photo_height'          => 190,
                                        'photo_params'          => array(),
                                        'display_photo_if_not_exists' => true,
                                        'display_date'                => false,
                                        'display_category'            => false,
                                        'display_customization'       => false,
                                ));
                            ?>
                        </li>
                    <?php endforeach;?>
                </ul>
                <section class="usersThumb">
                    <h4>他们的产品大受欢迎</h4>
                    <p>
                    <?php $count = 0;?>
                        <?php
                            if ($this->user_list instanceof Iterator)  {
                                $list = $this->user_list;
                            } else {
                                $list = array();
                            }
                        ?>
                    
                    <?php foreach($list as $user_l):?>
                        <?php
                        if(!empty($user_l->cid)){
                            /*
                            if(empty($user_l->company->image) || empty($user_l->company->username)){
                                continue;
                            }*/
                        }else{
                            /*
                            if(empty($user_l->pp)){
                                continue;
                            }
                            */
                        }
                        ?>
                            <a href="<?php echo !empty($user_l->cid) ? $user_l->company->url() : $user_l->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->cid) ? $user_l->company->image : $user_l->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                        <?php 
                        $count++;
                        if($count == 12){
                            break;
                        }
                        ?>
                    <?php endforeach;?>
                    </p>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>

        <?php $key = $this->key_homepage_new_user2; //'homepage_popular_listing'?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>	      
            <section class="new_user box">
                <h3>最新用户</h3>
                <ul>
                <?php $temp = 0;?>
                <?php foreach($this->new_users as $item):?>
                    <?php 
                    if(!empty($item->cid)){
                        //if(empty($item->company->image) || empty($item->company->company_name)) {continue;}
                    } else {
                        //if(empty($item->pp) || empty($item->name)) {continue;}
                    }
                    ?>
                    <li>
                        <dl class="">
                            <?php if(!empty($item->cid)):?>
                                <dt>
                                    <figure><a href="<?php echo $item->url()?>">
                                        <img src="<?php echo $this->thumbnail()->scale($item->company->image, 149, 149, true, true)?>"></a>
                                    </figure>
                                </dt>
                                <dd class="name">
                                    <h2><a href="<?php echo $item->url()?>"><?php echo $item->company->company_name?></a></h2>
                                </dd>
                                <dd class="func">
                                    <span>
                                        <a href="#" rel="<?php echo $this->geturl('follow','follow', array('id' => (string)$item->_id))?>" class="follow <?php echo (Model_Follow::isFollowing($item->_id) ? 'selected' : 'to_follow')?>">关注<em><?php echo Model_Follow::getCountFollowers($item->_id)?></em></a>
                                    </span>
                                </dd>
                            <?php else:?>
                                <dt>
                                    <figure><a href="<?php echo $item->url()?>">
                                        <img src="<?php echo $this->thumbnail()->scale($item->pp, 149, 149, true, true)?>"></a>
                                    </figure>
                                </dt>
                                <dd class="name">
                                    <h2><a href="<?php echo $item->url()?>"><?php echo $item->name?></a></h2>
                                </dd>
                                <dd class="func">
                                    <span>
                                        <a href="#" rel="<?php echo $this->geturl('follow','follow', array('id' => (string)$item->_id))?>" class="follow <?php echo (Model_Follow::isFollowing($item->_id) ? 'selected' : 'to_follow')?>">关注<em><?php echo Model_Follow::getCountFollowers($item->_id)?></em></a>
                                    </span>
                                </dd>
                            <?php endif;?>
                        </dl>
                    </li>
                    <?php 
                    if($temp==7){
                        break;
                    }
                    $temp++;
                    ?>
                <?php endforeach;?>
                </ul>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>

        <?php //1 ?>
        <?php $key = $this->key_homepage_category_property;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <section class="category property box">
                <h3>宠物</h3>
                <?php 
                $count = 0;
                if ($this->pro_listing instanceof Shanty_Mongo_Iterator_Cursor)  {
                    $list = $this->pro_listing;
                } else {
                    $list = array();
                }
                
                foreach($this->pro_listing as $item):?>
                    <?php if($count == 0):?>
                    <section class="highlight">
                            <?php
                                $this->partial()->setObjectKey('model');
                                echo $this->partial(
                                    'index/listing-element.phtml',
                                    'search',
                                    array(
                                        'item'                  => $item,
                                        'photo_width'           => 218,
                                        'photo_height'          => 218,
                                        'photo_params'          => array(),
                                        'photo_method'          => 'resizeAndCrop',
                                        'display_photo_if_not_exists' => true,
                                ));
                            ?>
                    </section>
                    <ul>
                    <?php else:?>
                        <li>
                            <?php
                                $this->partial()->setObjectKey('model');
                                echo $this->partial(
                                    'index/listing-element.phtml',
                                    'search',
                                    array(
                                        'item'                  => $item,
                                        'photo_width'           => 190,
                                        'photo_height'          => 190,
                                        'photo_params'          => array(),
                                        'photo_method'          => 'resizeAndCrop',
                                        'display_photo_if_not_exists' => true,
                                        'display_user'                => false,
                                        'display_date'                => false,
                                        'display_category'            => false,
                                        'display_customization'       => false,
                                ));
                            ?>
                        </li>
                    <?php endif;?>
                    <?php $count++;?>
                <?php endforeach;?>
                </ul>
                <section class="usersThumb">
                    <h4>他们也在分享物业</h4>
                    <p>
                    <?php foreach($this->pro_users as $user_l):?>
                        <a href="<?php echo !empty($user_l->user->cid) ? $user_l->user->company->url() : $user_l->user->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->user->cid) ? $user_l->user->company->image : $user_l->user->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                    <?php endforeach;?>
                    </p>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>
              
        <?php //2 ?>
        <?php $key = $this->key_homepage_category_car;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <section class="category car box">
                <h3>服装/鞋帽/箱包</h3>
                <?php 
                $count = 0;
                foreach($this->car_listing as $item):?>
                <?php if($count == 0):?>
                <section class="highlight">
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 218,
                                'photo_height'          => 218,
                                'photo_method'          => 'resizeAndCrop',
                                'photo_params'          => array(),
                        ));
                    ?>
                </section>
                <ul>
                <?php else:?>
                    <li>
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 65,
                                'photo_height'          => 65,
                                'photo_method'          => 'resizeAndCrop',
                                'photo_params'          => array(),
                                'display_photo_if_not_exists' => true,
                                'display_user'                => false,
                                'display_date'                => false,
                                'display_category'            => false,
                                'display_customization'       => false,
                        ));
                    ?>
                    </li>
                <?php endif;?>
                <?php $count++;?>
            <?php endforeach;?>
                </ul>
                <section class="usersThumb">
                    <h4>他们也在分享汽车</h4>
                    <p>
                    <?php foreach($this->car_users as $user_l):?>
                        <a href="<?php echo !empty($user_l->user->cid) ? $user_l->user->company->url() : $user_l->user->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->user->cid) ? $user_l->user->company->image : $user_l->user->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                    <?php endforeach;?>
                    </p>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>

        <?php //3 ?>
        <?php $key = $this->key_homepage_category_job;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <section class="category property box">
                <h3>数码家电</h3>
                <?php 
                $count = 0;
                foreach($this->job_listing as $item):?>
                    <?php if($count == 0):?>
                    <section class="highlight">
                            <?php
                                $this->partial()->setObjectKey('model');
                                echo $this->partial(
                                    'index/listing-element.phtml',
                                    'search',
                                    array(
                                        'item'                  => $item,
                                        'photo_width'           => 218,
                                        'photo_height'          => 218,
                                        'photo_params'          => array(),
                                        'photo_method'          => 'resizeAndCrop',
                                        'display_photo_if_not_exists' => true,
                                ));
                            ?>
                    </section>
                    <ul>
                    <?php else:?>
                        <li>
                            <?php
                                $this->partial()->setObjectKey('model');
                                echo $this->partial(
                                    'index/listing-element.phtml',
                                    'search',
                                    array(
                                        'item'                  => $item,
                                        'photo_width'           => 190,
                                        'photo_height'          => 190,
                                        'photo_params'          => array(),
                                        'photo_method'          => 'resizeAndCrop',
                                        'display_photo_if_not_exists' => true,
                                        'display_user'                => false,
                                        'display_date'                => false,
                                        'display_category'            => false,
                                        'display_customization'       => false,
                                ));
                            ?>
                        </li>
                    <?php endif;?>
                    <?php $count++;?>
                <?php endforeach;?>
                </ul>
                <?php if ($this->pro_users instanceof Shanty_Mongo_Iterator_Cursor):?>
                    <section class="usersThumb">
                        <h4>他们也在分享物业</h4>
                        <p>
                        <?php foreach($this->pro_users as $user_l):?>
                            <a href="<?php echo !empty($user_l->user->cid) ? $user_l->user->company->url() : $user_l->user->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->user->cid) ? $user_l->user->company->image : $user_l->user->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                        <?php endforeach;?>
                        </p>
                    </section>
                <?php endif;?>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>
              
        <?php //4 ?>
        <?php $key = $this->key_homepage_category_bus;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>
            <section class="category car box">
                <h3>美容/健康</h3>
                <?php 
                $count = 0;
                foreach($this->bus_listing as $item):?>
                <?php if($count == 0):?>
                <section class="highlight">
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 218,
                                'photo_height'          => 218,
                                'photo_method'          => 'resizeAndCrop',
                                'photo_params'          => array(),
                        ));
                    ?>
                </section>
                <ul>
                <?php else:?>
                    <li>
                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'photo_width'           => 65,
                                'photo_height'          => 65,
                                'photo_method'          => 'resizeAndCrop',
                                'photo_params'          => array(),
                                'display_photo_if_not_exists' => true,
                                'display_user'                => false,
                                'display_date'                => false,
                                'display_category'            => false,
                                'display_customization'       => false,
                        ));
                    ?>
                    </li>
                <?php endif;?>
                <?php $count++;?>
            <?php endforeach;?>
                </ul>
                <?php if ($this->bus_users instanceof Shanty_Mongo_Iterator_Cursor):?>
                    <section class="usersThumb">
                        <h4>他们也在分享汽车</h4>
                        <p>
                        <?php foreach($this->bus_users as $user_l):?>
                            <a href="<?php echo !empty($user_l->user->cid) ? $user_l->user->company->url() : $user_l->user->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->user->cid) ? $user_l->user->company->image : $user_l->user->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                        <?php endforeach;?>
                        </p>
                    </section>
                <?php endif;?>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>




<?php /*	     
        <?php $key = $this->key_homepage_category_job;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?> 
            <section class="category job list box">
                <h3>求职</h3>
                <ul>
                <?php foreach($this->job_listing as $item):?>
                    <li>

                    <?php
                        $this->partial()->setObjectKey('model');
                        echo $this->partial(
                            'index/listing-element.phtml',
                            'search',
                            array(
                                'item'                  => $item,
                                'display_photo_if_not_exists' => true,
                                'display_photo' =>false,
                                'display_user'                => false,
                                'display_date'                => false,
                                'display_category'            => false,
                                'display_customization'       => false,
                        ));
                    ?>
                    </li>
                <?php endforeach;?>
                </ul>
                
                <section class="usersThumb">
                    <h4>他们也在分享求职</h4>
                    <p>
                    <?php foreach($this->job_users as $user_l):?>
                        <a href="<?php echo !empty($user_l->user->cid) ? $user_l->user->company->url() : $user_l->user->url();?>"><img src="<?php echo $this->thumbnail()->scale(!empty($user_l->user->cid) ? $user_l->user->company->image : $user_l->user->pp, 24, 24, true, true)?>" alt="<?php echo $user_l->name?>"></a>
                    <?php endforeach;?>
                    </p>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>
	
        <?php $key = $this->key_homepage_category_bus;?>
        <?php if (!$output = $this->cacheOutput()->start($key)):?>	
            <section class="category business list box">
                <h3>商业目录</h3>
                <ul>
                <?php foreach($this->bus_listing as $item):?>
                    <li>
                        <?php
                            $this->partial()->setObjectKey('model');
                            echo $this->partial(
                                'index/listing-element.phtml',
                                'search',
                                array(
                                    'item'                  => $item,
                                    'display_photo_if_not_exists' => true,
                                    'display_photo' =>false,
                                    'display_user'                => false,
                                    'display_date'                => false,
                                    'display_category'            => false,
                                    'display_customization'       => false,
                            ));
                        ?>
                    </li>
                <?php endforeach;?>
                </ul>
                
                <section class="usersThumb">
                    <h4>他们也在分享商业目录</h4>
                    <p>
                    
                    <?php foreach($this->bus_users as $user_l):?>					
                        <a href="<?php echo $user_l->url();?>"><img src="<?php echo $this->thumbnail()->scale($user_l->image, 24, 24)?>" alt="<?php echo $user_l->name?>"></a>
                    <?php endforeach;?>
                    </p>
                </section>
            </section>
            <?php $this->cacheOutput()->end(array('homepage', $key), 120)?>
            <!-- not cached: <?php echo $key?> -->
        <?php else :?>
            <?php echo $output?>
            <!-- cached: <?php echo $key?> -->
        <?php endif;?>
*/?>
    </section>
    
	<aside class="aside">
		<section class="baiduNews box">
			<script language="JavaScript" type="text/JavaScript" src="http://news.baidu.com/n?cmd=1&class=civilnews&pn=1&tn=newsbrofcu"></script>
		</section>
        <?php echo $this->partial('index/commercial-zone2.phtml', 'default');?>
		<section class="weibo">
            <iframe width="100%" height="550" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=2&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=2606608634&verifier=d5cf5ffc&dpc=1"></iframe>        
		</section>
	</aside>
</article> 
